//菜单
$(".allProdous h2").mouseenter(function(){
	$(".redNav").css("display","block");
})

$(".allProdous").mouseleave(function(){
	$(".redNav li").css("background","#d32402");
});
$(".redNav li").click(function(){   //点击购买.跳转到列表页面
		window.location.href = "./html/daohang1.html";
	});
$(".louBox").find("img").click(function(){
		window.location.href = "./html/daohang1.html";
})
//二级菜单
$(".redNav li").mouseenter(function(){
	$(this).css("background","url(fstvgo/dhb.gif)").siblings().css("background","#d32402");
//	//ajax获取菜单数据
//	$.ajax({
//		type:"get",
//		url:"data/dataErji.json",
//		async:true,
//		dataType:"json",
//		success:function(mlist){
//			//console.log(mlist);
////			var ojson = window.eval(mlist);  //
////			console.log(ojson);
//
//			var oli = "";  //在ul中创建li
//			for (var i in mlist) {
//				//console.log(mlist[i].list.liname.li2);    //此时i就是list1 ~ list7	
//				for(var j=1;j<mlist[i].list.liname.length;j++){oli += "<li>"+ mlist[i].list.liname.("li"+j)+"</li>"}
//				
//			}
////			console.log(oli); //
//			var $oul =  $("<ul></ul>");
//			$oul.html(oli);
//			console.log( $oul.html() );
//			
//			$(".redNav .pinpai").eq( $(this).index() ).css("display" ,"block").html('<div class="pp1"> '+ $oul.html() +' </div>');
//		}
//	});
	$(".redNav .pinpai").eq( $(this).index() ).css("display" ,"block").html('<div class="pp1"><ul><li>家居用品</li><li>家居用品</li><li>家居用品</li><li>家居用品</li></ul></div><div class="pp2"><h2>家居用品</h2><p>乐扣乐扣</p><p>妙煮妇</p><p>乐扣乐扣</p><p>妙煮妇</p><p>乐扣乐扣</p></div><div class="pp3"><h2>家居用品</h2><img src="../fs/img/20141121103155.jpg" alt="" title="" /><img src="../fs/img/20141121145445.jpg" alt="" title="" /></div>');
	
}).mouseleave(function(){
	$(this).find("div").css("display","none");
});
//$(".redNav").mouseleave(function(){
//	$(".redNav").css("display","none");
//})
$(".mygo").mouseenter(function(){
	$("#myfs").css("display","block");
});
$(".mygo").mouseleave(function(){
	$("#myfs").css("display","none");
});
$(".BannerTop_close").click(function(){
	$(".BannerTop").css("display","none");
});
$("#searchinpt").focus(function(){
	$(this).val("");
});
$("#searchinpt").blur(function(){
	$(this).val("请输入商品关键词或者贷号");
});
$("#searchBottom a").mouseenter(function(){
	$(this).css("color","red").siblings().css("color","black");
});
$(".goCar").mouseenter(function(){
	$(this).css("color","red").children().css("color","black");
}).mouseleave(function(){
	$(this).css("color","black");
});
$(".ask").mouseenter(function(){
	$(this).html("点击马上咨询我");
}).mouseleave(function(){
	$(this).html("");
})
//$(".ask").mouseenter(function(){
//	$("<span></span>").html("点击马上咨询我").addClass("zixun").appendTo( $("body") );
//}).mousemove(function(e){
//	var e = e||window.event;
//	var disx = e.clientX;
//	var disy = e.clientY;
//	$(".zixun").css({"left":disx,"top":disy,"position":"absolute"});
//})
//跳转到我的风尚
$("#myfs").find("li").click(function(){

	window.location.href = "./html/myFs.html";
});
//点击banner图跳转到相应专题商品订购页面
$(".bannerC ul li img").click(function(){
	$(this).animate({
		"width":0,
		"height":0
	},500,function(){
		window.location.href = "html/bannerKaixueji.html";
	});
})
//banner 轮播
var  timeLunbo = setInterval(Catculer,3000);
	var indexlunbo = 0;
	function Catculer(){
		$("#olli li").eq(indexlunbo).addClass("activeLunbo").siblings().removeClass("activeLunbo");
		$(".bannerC ul li").eq(indexlunbo).animate({"left":0},1000,function(){
			$(this).css("z-index",0).siblings().css({"left":-720,"z-index":1})
		});
		indexlunbo++;
		if(indexlunbo >= 8){
			indexlunbo = 0;
		}
	}
	$("#olli li").mouseenter(function(){
		clearInterval(timeLunbo);
		indexlunbo = $(this).index();
		Catculer();
	});
	$("#olli li").mouseleave(function(){
		timeLunbo = setInterval(Catculer,2000);
	});
$(".nav a").mouseenter(function(){
	$(this).css("color","red");
}).mouseleave(function(){
	$(this).css("color","black");
});
//特惠的轮播
i = 1;
var tejiaTime = setInterval(function(){
	if( i <= 3 ){
		$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
		if(i==1){
			$(".miaoyan").html("妙言便捷旋转拖把套组");
			$(".tehuiToday").html("今日劲爆特价:¥239");
			
		}else if(i==2){
			$(".miaoyan").html("美容颜面的新品美丽的魅力");
			$(".tehuiToday").html("今日劲爆特价:¥666");
		}else{
			$(".miaoyan").html("死飞的创驰品牌回馈特价");
			$(".tehuiToday").html("今日劲爆特价:¥888");
		}
		i++;							$
	}else{
		i=1;
	}
	
},2000);
//今日特惠按钮
$("#tehuileftBtn").click(function(){
	if(i==1){
			$(".miaoyan").html("妙言便捷旋转拖把套组");
			$(".tehuiToday").html("今日劲爆特价:¥239");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i++;
		}else if(i==2){
			$(".miaoyan").html("美容颜面的新品美丽的魅力");
			$(".tehuiToday").html("今日劲爆特价:¥666");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i++
		}else{
			$(".miaoyan").html("死飞的创驰品牌回馈特价");
			$(".tehuiToday").html("今日劲爆特价:¥888");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i=1;
		}
})
$("#tehuitightBtn").click(function(){
	if(i==3){
			$(".miaoyan").html("妙言便捷旋转拖把套组");
			$(".tehuiToday").html("今日劲爆特价:¥239");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i--;
		}else if(i==2){
			$(".miaoyan").html("美容颜面的新品美丽的魅力");
			$(".tehuiToday").html("今日劲爆特价:¥666");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i--
		}else{
			$(".miaoyan").html("死飞的创驰品牌回馈特价");
			$(".tehuiToday").html("今日劲爆特价:¥888");
			$(".tehuileft").css("background","url(img/bg"+i+".jpg)");
			i=3;
		}
})
//tv热榜按钮
$("#tv1leftBtn").click(function(){
	if(i==1){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607082134287134912.jpg");
		i++;
	}else if(i==2){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607181106115242201.png.jpg");
		i++;
	}else if(i==3){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607111610057184809.png.jpg");
		i++;
	}else{
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607071113451592051.png.jpg")
		i=1;
	}
})
$("#tv1rightBtn").click(function(){
	if(i==4){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607082134287134912.jpg");
		i--;
	}else if(i==3){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607181106115242201.png.jpg");
		i--;
	}else if(i==2){
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607111610057184809.png.jpg");
		i--;
	}else{
		$(".TVtebo dl").find("img").attr("src","fstvgo/201607071113451592051.png.jpg");
		i=4;
	}
});
//跳转到首页
$(".nav").find("a").click(function(){
	window.location.href = "index.html"
});
$(".fsToutiao").find("ul").find("li").mouseenter(function(){
	$(this).css("color","red");
}).mouseleave(function(){
	$(this).css("color","black");
});

$(".longpic").fadeTo(10,0.7);
$(".longpic").mouseenter(function(){
	$(this).fadeTo(100,1);
}).mouseleave(function(){
	$(this).fadeTo(100,0.7);
});
$(".wushi").find("span").click(function(){
//	alert(1);
	window.location.href = "./html/zhuce.html";
})










































